# import urllib.request

# response = urllib.request.urlopen('http://www.baidu.com')
# html = response.read()
# print(html.decode('utf-8'))

# import urllib.parse
# import urllib.request

# data = bytes(urllib.parse.urlencode({'world':'hello'}), encoding='utf-8')
# response = urllib.request.urlopen('http://httpbin.org/post', data=data)
# html = response.read()
# print(html)

# import urllib3
# http = urllib3.PoolManager()

# # response = http.request('GET', 'http://www.baidu.com')
# response = http.request('POST','http://httpbin.org/post', fields={'world':'hello'})
# print(response.data.decode())

# import requests
# response = requests.get('http://www.baiduc.com')
# print(response.status_code)
# print(response.url)
# print(response.headers)
# print(response.cookies)
# print(response.text)
# print(response.content)

# import requests
# data = {'world': 'hello'}
# response = requests.post('http://httpbin.org/post', data=data)
# print(response.content)

# import requests
# payload = {'key1':'value1', 'key2':'value2'}
# response = requests.get('http://httpbin.org/get', params=payload)
# print(response.content.decode())

# import requests
# url = 'https://www.whatismyip.com/'
# headers = {"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:107.0) Gecko/20100101 Firefox/107.0"}
# response = requests.get(url, headers=headers)
# print(response.content.decode('utf-8'))